import xhr from '@/utils/request'
import md5 from 'js-md5'
export const geterweima = () => {
  return xhr({
    method: 'get',
    url: '/sessions/code',
  })
}
export const iserweima = (is) => {
  return xhr({
    method: 'post',
    url: '/sessions/code',
    data: {
      captcha: is,
    },
  })
}
export const istrue = (is) => {
  return xhr({
    method: 'post',
    url: '/sessions',
    data: {
      username: is.name,
      password: md5(is.password),
      captcha: is.yzm,

    },
  })
}
